1. Field of the Invention
The present invention relates to a compression and expansion apparatus for variable-length codes, more particularly, to an apparatus for compressing image signals into variable-length codes to form compressed data, and an apparatus for expanding compressed codes to restore symbols.
2. Description of the Background Art
In order to store into a memory or transmit imagewise digital data such as picture data resultant from imaging by an electronic digital still camera, for example, various methods of compression coding are established to reduce the amount of data. Especially, the bidimensional orthogonal transform and coding, such as the adaptive cosine transform, is available to accomplish a fairly increased compression ratio or efficiency. The scheme of compressing still image signals on the basis of the adaptive cosine transform is proposed as an international standard of the JPEG (Joint Picture Coding Expert Group) committed Draft.
As one of those standards, the Huffman coding is available. As well known in the art, the Huffman coding is a variable-length coding in which data is encoded so that the average length of codes resultant from the coding becomes shortest. Decoder circuits may be bulky and sophisticated in structure if they are implemented into complete hardware. In order to avoid such bulky and sophisticated structure, look-up tables (LUTs) have conventionally been employed. Such LUTs required very larger storage areas. With some commercially available, large-scale integrated circuits dedicated for the Huffman coding, 32K bit storage areas are required for coding storage whereas even 4M bit storage areas are for decoding. It was difficult to design digital electronic still cameras incorporating such a large-storage capacity memory. In order to overcome those difficulties, Japanese patent laid-open publication No. 220870/1991 proposed a method of automatically producing decoder tables for decoding variable-length codes in which the tree structure is used which defines transition conditions and terminating processings on a bit-by-bit basis of Huffman codes.
For example, electronic digital still cameras using a memory card have a difficulty with respect to storage capacity of the storage device in the camera in order to satisfy the requirements for reducing the size of the cameras. The coding requires the minimum storage capacity of 10K bits pursuant to the JPEG Base Line, for example. It would therefore be advantageous to implement a decoding system with the minimum storage capacity merely required for the Huffman coding.